From 4de19fce569aa33d7eadb1e3c5c62e8ee55e8741 Mon Sep 17 00:00:00 2001 From: Ewan Mellor Date: Fri, 22 Dec 2006 11:34:13 +0000 Subject: [PATCH] Cope with a response that's not a dictionary. Signed-off-by: Ewan Mellor --- tools/python/xen/xm/XenAPI.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/python/xen/xm/XenAPI.py b/tools/python/xen/xm/XenAPI.py index 5cf929f48c..cd794087c3 100644 --- a/tools/python/xen/xm/XenAPI.py +++ b/tools/python/xen/xm/XenAPI.py @@ -106,7 +106,7 @@ class Session(xen.util.xmlrpclib2.ServerProxy): def _parse_result(result): - if 'Status' not in result: + if type(result) != dict or 'Status' not in result: raise xmlrpclib.Fault(500, 'Missing Status in response from server') if result['Status'] == 'Success': if 'Value' in result: -- 2.30.2